def make_chocolate(small, big, goal):
  if goal >= big * 5:
    r = goal - big * 5
  else:
    r = goal % 5
  if r <= small:
    return r
  else:
    return -1